<?php

function db_connect() {
	$result = new mysqli('shopping.marpiterian.net', 'paypuhclypz', 'udgwrtj5yh0', 'cisw31_shop');
	if (!$result) {
		return false;
	}
	$result->autocommit(TRUE);
	return $result;
}

function db_result_to_array($result) {
	$res_array = array();

	for ($count=0; $row = $result->fetch_assoc(); $count++) {
		$res_array[$count] = $row;
	}

	return $res_array;
}

?>
